import './index.css';

import React, { Component } from 'react';
import ReactDom from 'react-dom';
import { BrowserRouter as Router, Route, Link } from 'react-router-dom';

import search from './pages/search';
import manager from './pages/manager';

class Index extends Component {
  constructor(props) {
    super(props);
    this.state = {
    };
  }

  render() {
    return (

      <Router>
        <div>
          <div className="leftbox">
            <div className="linkbox">
              <Link to="/">搜索</Link>
              <Link to="/manager">管理</Link>
            </div>
          </div>
          <div className="rightbox">
            <Route exact path="/" component={search} />
            <Route path="/manager" component={manager} />

          </div>
          <div className="cb" />
        </div>
      </Router>
    );
  }
}

ReactDom.render(<Index />, document.getElementById('app'));
